<?php
/**
 * TomatoCMS
 *
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 *
 * @copyright    Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license        http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version     $Id: list.phtml 3032 2010-05-25 08:00:42Z huuphuoc $
 */
?>
<?php
$this->headTitle($this->translator('advertise_enterprise_page_title'));

$this->headScript()
    ->appendFile($this->APP_STATIC_SERVER . '/js/jquery.validate/jquery.validate.min.js')
    ;
?>

<div class="grid_12 t_a_ui_breadcrumb">
    <span><?php echo $this->translator('advertise_enterprise_breadcump'); ?></span>
</div>

<?php
    $serUrl = $this->APP_STATIC_SERVER. "/images/advertise/enterprise";

    /**Image 1*/
    $file1 = $serUrl."/enterprise_ad1.jpg";
    $path1 = str_replace($this->APP_STATIC_SERVER,getcwd(),$file1);
    $urlImage1 = is_file($path1)?$file1:null;

    /**Image 2*/
    $file2 = $serUrl."/enterprise_ad2.jpg";
    $path2 = str_replace($this->APP_STATIC_SERVER,getcwd(),$file2);
    $urlImage2 = is_file($path2)?$file2:null;

    /**Image 3*/
    $file3 = $serUrl."/enterprise_ad3.jpg";
    $path3 = str_replace($this->APP_STATIC_SERVER,getcwd(),$file3);
    $urlImage3 = is_file($path3)?$file3:null;

    /**Image 4*/
    $file4 = $serUrl."/enterprise_ad4.jpg";
    $path4 = str_replace($this->APP_STATIC_SERVER,getcwd(),$file4);
    $urlImage4 = is_file($path4)?$file4:null;

    /**Image 5*/
    $file5 = $serUrl."/enterprise_ad5.jpg";
    $path5 = str_replace($this->APP_STATIC_SERVER,getcwd(),$file5);
    $urlImage5 = is_file($path5)?$file5:null;
?>

<!--Advertise form-->
<form method="post" action="" id="adEnterpriseForm" enctype="multipart/form-data">
<div class="grid_12 t_a_bottom">
    <div class="prefix_1 suffix_1">
        <div class="clearfix t_a_bottom">
            <div class="grid_8 t_a_ui_breadcrumb" style="padding-top:5px;">
                <span><?php echo $this->translator('advertise_enterprise_update_guide'); ?></span>
            </div>
            <div class="grid_10 alpha" style="padding-top:5px;">
                <label>&nbsp;</label>
                (<?php echo $this->translator('advertise_id_chain_guide');?>)
            </div>
            <div class="grid_10 alpha">
                <label><?php echo $this->translator('advertise_enterprise_id');?>:</label>
                <input type="text" value="<?php echo $this->enterprise_id_chain;?>" name="id_chain" style="width:213px" />
            </div>

            <div class="grid_8 t_a_ui_breadcrumb" style="padding-top:5px;">
                <span><?php echo $this->translator('advertise_image_update_guide'); ?></span>
            </div>
            <div class="grid_10 alpha" style="padding-top:5px;">
                <label>&nbsp;</label>
                (<?php echo $this->translator('advertise_enterprise_upload_guide');?>)
            </div>
            <div class="grid_10 alpha">
                <label>&nbsp;</label>
                <input type="file" value="" name="image[]" style="width:220px" />
            </div>
            <div class="grid_10 alpha">
                <label><?php echo $this->translator('advertise_upload_link');?>:</label>
                <input type="text" value="<?php echo isset($this->arrLink[1])?$this->arrLink[1]:null;?>" name="link[1]" style="width:400px" />
            </div>
            <div class="grid_10 alpha t_a_bottom">
                <label>&nbsp;</label>
                <?php if($urlImage1):?>
                <img src="<?php echo $urlImage1;?>" />
                <?php else:?>
                <?php echo $this->translator('advertise_product_no_image');?>
                <?php endif;?>
            </div>

            <div class="grid_10 alpha">
                <label>&nbsp;</label>
                <input type="file" value="" name="image[]" style="width:220px" />
            </div>
            <div class="grid_10 alpha">
                <label><?php echo $this->translator('advertise_upload_link');?>:</label>
                <input type="text" value="<?php echo isset($this->arrLink[2])?$this->arrLink[2]:null;?>" name="link[2]" style="width:400px" />
            </div>
            <div class="grid_10 alpha t_a_bottom">
                <label>&nbsp;</label>
                <?php if($urlImage2):?>
                <img src="<?php echo $urlImage2;?>" />
                <?php else:?>
                <?php echo $this->translator('advertise_product_no_image');?>
                <?php endif;?>
            </div>

            <div class="grid_10 alpha">
                <label>&nbsp;</label>
                <input type="file" value="" name="image[]" style="width:220px" />
            </div>
            <div class="grid_10 alpha">
                <label><?php echo $this->translator('advertise_upload_link');?>:</label>
                <input type="text" value="<?php echo isset($this->arrLink[3])?$this->arrLink[3]:null;?>" name="link[3]" style="width:400px" />
            </div>
            <div class="grid_10 alpha t_a_bottom">
                <label>&nbsp;</label>
                <?php if($urlImage3):?>
                <img src="<?php echo $urlImage3;?>" />
                <?php else:?>
                <?php echo $this->translator('advertise_product_no_image');?>
                <?php endif;?>
            </div>

            <div class="grid_10 alpha">
                <label>&nbsp;</label>
                <input type="file" value="" name="image[]" style="width:220px" />
            </div>
            <div class="grid_10 alpha">
                <label><?php echo $this->translator('advertise_upload_link');?>:</label>
                <input type="text" value="<?php echo isset($this->arrLink[4])?$this->arrLink[4]:null;?>" name="link[4]" style="width:400px" />
            </div>
            <div class="grid_10 alpha t_a_bottom">
                <label>&nbsp;</label>
                <?php if($urlImage4):?>
                <img src="<?php echo $urlImage4;?>" />
                <?php else:?>
                <?php echo $this->translator('advertise_product_no_image');?>
                <?php endif;?>
            </div>

            <div class="grid_10 alpha">
                <label>&nbsp;</label>
                <input type="file" value="" name="image[]" style="width:220px" />
            </div>
            <div class="grid_10 alpha">
                <label><?php echo $this->translator('advertise_upload_link');?>:</label>
                <input type="text" value="<?php echo isset($this->arrLink[5])?$this->arrLink[5]:null;?>" name="link[5]" style="width:400px" />
            </div>
            <div class="grid_10 alpha">
                <label>&nbsp;</label>
                <?php if($urlImage5):?>
                <img src="<?php echo $urlImage5;?>" />
                <?php else:?>
                <?php echo $this->translator('advertise_product_no_image');?>
                <?php endif;?>
            </div>

            <div class="grid_8 t_a_ui_breadcrumb"></div>
            <div class="clearfix t_a_bottom">
                <div class="grid_10 alpha">
                    <label>&nbsp;</label>
                    <button type="submit"><span style="height:30px; text-align:center; width:auto;" ><?php echo $this->translator('advertise_save_button');?></span></button>
                </div>
            </div>
        </div>
    </div>
</div>
</form>